Optimal. Leaf size=59 \[ \frac{a c^3 (B+i A) (1-i \tan (e+f x))^3}{3 f}-\frac{a B c^3 (1-i \tan (e+f x))^4}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0932845, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 39, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.051, Rules used = {3588, 43} \[ \frac{a c^3 (B+i A) (1-i \tan (e+f x))^3}{3 f}-\frac{a B c^3 (1-i \tan (e+f x))^4}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3588
Rule 43
Rubi steps
\begin{align*} \int (a+i a \tan (e+f x)) (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx &=\frac{(a c) \operatorname{Subst}\left (\int (A+B x) (c-i c x)^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(a c) \operatorname{Subst}\left (\int \left ((A-i B) (c-i c x)^2+\frac{i B (c-i c x)^3}{c}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{a (i A+B) c^3 (1-i \tan (e+f x))^3}{3 f}-\frac{a B c^3 (1-i \tan (e+f x))^4}{4 f}\\ \end{align*}
Mathematica [B] time = 3.47084, size = 161, normalized size = 2.73 \[ \frac{a c^3 \sec (e) \sec ^4(e+f x) (3 (B-i A) \cos (e+2 f x)+3 (B-2 i A) \cos (e)+5 A \sin (e+2 f x)-3 A \sin (3 e+2 f x)+2 A \sin (3 e+4 f x)-3 i A \cos (3 e+2 f x)-6 A \sin (e)+i B \sin (e+2 f x)-3 i B \sin (3 e+2 f x)+i B \sin (3 e+4 f x)+3 B \cos (3 e+2 f x)-3 i B \sin (e))}{12 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.011, size = 75, normalized size = 1.3 \begin{align*}{\frac{a{c}^{3}}{f} \left ( -{\frac{2\,i}{3}}B \left ( \tan \left ( fx+e \right ) \right ) ^{3}-{\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{4}}{4}}-iA \left ( \tan \left ( fx+e \right ) \right ) ^{2}-{\frac{A \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3}}+{\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{2}}{2}}+A\tan \left ( fx+e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.70329, size = 99, normalized size = 1.68 \begin{align*} -\frac{3 \, B a c^{3} \tan \left (f x + e\right )^{4} +{\left (4 \, A + 8 i \, B\right )} a c^{3} \tan \left (f x + e\right )^{3} - 6 \,{\left (-2 i \, A + B\right )} a c^{3} \tan \left (f x + e\right )^{2} - 12 \, A a c^{3} \tan \left (f x + e\right )}{12 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.36608, size = 236, normalized size = 4. \begin{align*} \frac{{\left (8 i \, A + 8 \, B\right )} a c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} +{\left (8 i \, A - 4 \, B\right )} a c^{3}}{3 \,{\left (f e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 4 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 9.01819, size = 133, normalized size = 2.25 \begin{align*} \frac{\frac{\left (8 i A a c^{3} - 4 B a c^{3}\right ) e^{- 8 i e}}{3 f} + \frac{\left (8 i A a c^{3} + 8 B a c^{3}\right ) e^{- 6 i e} e^{2 i f x}}{3 f}}{e^{8 i f x} + 4 e^{- 2 i e} e^{6 i f x} + 6 e^{- 4 i e} e^{4 i f x} + 4 e^{- 6 i e} e^{2 i f x} + e^{- 8 i e}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.59732, size = 143, normalized size = 2.42 \begin{align*} \frac{8 i \, A a c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 8 \, B a c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 8 i \, A a c^{3} - 4 \, B a c^{3}}{3 \,{\left (f e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 4 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]